package source;

public class Planet extends Terrain{
	private int manpower;
	private int ore;
	private int energy;
	
	public Planet(){
		super(TerrainType.PLANET);
		this.manpower = (int)(Math.random() * 80 + 20);
		this.ore = (int)(Math.random() * 8000 + 2000);
		this.energy = (int)(Math.random() * 80 + 20);
	}
	
	public int getManpower(){return manpower;}
	public int getOreLeft(){return ore;}
	public int getEnergy(){return energy;}
	
	public int extractOre(int extract){
		if (ore >= extract){
			ore -= extract;
			return extract;
		}
		int temp = ore;
		ore = 0;
		return temp;
	}
}
